package practice;

import org.junit.jupiter.api.Test;

import java.util.*;

/**
 * @author: kejl
 * @create: 2020-10-13 19:26
 */
public class Day1013 {

    @Test
   void testCollection(){

        List strList = new ArrayList();

        strList.add("1");
        strList.add("2");

        Iterator it = strList.iterator();

        while (it.hasNext()){
            System.out.println((String)it.next());
        }


        ListIterator listIterator = strList.listIterator();

        while(listIterator.hasPrevious()){
            System.out.println(listIterator.previous());
        }

        Map map  = Collections.synchronizedMap(new HashMap<>());

        Set set  =  Collections.synchronizedSet(new HashSet<>());

        List list = Collections.synchronizedList(new ArrayList<>());











    }

}
